import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建学校管理--专业
export function createProfessions(data) {
  return request({
    url: adminUrl + '/collegebase/professions/create',
    method: 'post',
    data: data
  })
}

// 更新学校管理--专业
export function updateProfessions(data) {
  return request({
    url: adminUrl + '/collegebase/professions/update',
    method: 'put',
    data: data
  })
}

// 删除学校管理--专业
export function deleteProfessions(id) {
  return request({
    url: adminUrl + '/collegebase/professions/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学校管理--专业
export function getProfessions(id) {
  return request({
    url: adminUrl + '/collegebase/professions/get?id=' + id,
    method: 'get'
  })
}

// 获得学校管理--专业分页
export function getProfessionsPage(query) {
  return request({
    url: adminUrl + '/collegebase/professions/page',
    method: 'get',
    params: query
  })
}

// 导出学校管理--专业 Excel
export function exportProfessionsExcel(query) {
  return request({
    url: adminUrl + '/collegebase/professions/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
